﻿using System;
using System.Windows.Forms;
using QLCF.Forms;
using System.Globalization;
using System.Threading;
using System.Management;
using Microsoft.Win32;
using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlServer.Management.Common;
using System.Collections.Specialized;
using WorkFlowBLL;
using Microsoft.VisualBasic.ApplicationServices;

namespace QLCF
{
    public static class Program
    {
        public static EntityBLL.User UserEntity = new EntityBLL.User();
        public static frmLogin frmLoginMain = null;
        public static Boolean isLogin = false;
        public static Boolean IsActive = false;

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            //Set CurrentCulture
            CultureInfo ci = new CultureInfo("en-US", true);
            ci.NumberFormat.NumberDecimalSeparator = ".";
            ci.NumberFormat.NumberGroupSeparator = ",";
            ci.DateTimeFormat.ShortDatePattern = "dd/MM/yyyy";
            ci.DateTimeFormat.ShortTimePattern = "hh:mm:ss tt";
            Thread.CurrentThread.CurrentCulture = ci;            

            //end Set                  
            frmPrepareAppication pre = new frmPrepareAppication();
            SingleInstance.Run(pre, new StartupNextInstanceEventHandler(
                SingleInstance.StartupNextInstanceHandler));
        }
    }
}
